#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>

int main()
{
    pid_t id = fork();
    if (id < 0)
    {
        perror("fork");
    }
    else if (id == 0)
    {
        printf("I am child process: %d\n", getpid());
        execlp("ls", "ls", "-a", "-l", NULL);
        exit(1);
    }
    else{
        wait(id);
    }

    return 0;
}
